<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>eRPC API Reference: Client Setup</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">eRPC API Reference
   &#160;<span id="projectnumber">Rev. 1.5.0</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__client__setup.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#typedef-members">Typedefs</a>  </div>
  <div class="headertitle">
<div class="title">Client Setup<div class="ingroups"><a class="el" href="group__setup.html">Setup API</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Client side setup functions.  
<a href="#details">More...</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<p>Client side setup functions. </p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for Client Setup:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<center><table><tr><td><div class="center"><iframe scrolling="no" frameborder="0" src="group__client__setup.svg" width="234" height="38"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</td></tr></table></center>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:erpc__arbitrated__client__setup_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="erpc__arbitrated__client__setup_8h.html">erpc_arbitrated_client_setup.h</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:erpc__client__setup_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="erpc__client__setup_8h.html">erpc_client_setup.h</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gab7dcc8461d2301b2ae32448b0f69ef85"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__client__setup.html#gab7dcc8461d2301b2ae32448b0f69ef85">client_error_handler_t</a>) (<a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> err)</td></tr>
<tr class="separator:gab7dcc8461d2301b2ae32448b0f69ef85"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Arbitrated client setup</h2></td></tr>
<tr class="memitem:gad9d2c46ec314b6a5b0a2010b82e6ff07"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__transport__setup.html#ga925aa73c3fc0da2a6f94ee65c4b108c0">erpc_transport_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__client__setup.html#gad9d2c46ec314b6a5b0a2010b82e6ff07">erpc_arbitrated_client_init</a> (<a class="el" href="group__transport__setup.html#ga925aa73c3fc0da2a6f94ee65c4b108c0">erpc_transport_t</a> transport, <a class="el" href="group__message__buffer__factory__setup.html#ga73f8fbab58ca7553109bc98b28e72bf5">erpc_mbf_t</a> message_buffer_factory)</td></tr>
<tr class="memdesc:gad9d2c46ec314b6a5b0a2010b82e6ff07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a client that shares its transport with the server.  <a href="#gad9d2c46ec314b6a5b0a2010b82e6ff07">More...</a><br /></td></tr>
<tr class="separator:gad9d2c46ec314b6a5b0a2010b82e6ff07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaed9d0f4e2c3a22bde5a4f1077c54f04e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__client__setup.html#gaed9d0f4e2c3a22bde5a4f1077c54f04e">erpc_client_set_error_handler</a> (<a class="el" href="group__client__setup.html#gab7dcc8461d2301b2ae32448b0f69ef85">client_error_handler_t</a> error_handler)</td></tr>
<tr class="memdesc:gaed9d0f4e2c3a22bde5a4f1077c54f04e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function set error handler function.  <a href="#gaed9d0f4e2c3a22bde5a4f1077c54f04e">More...</a><br /></td></tr>
<tr class="separator:gaed9d0f4e2c3a22bde5a4f1077c54f04e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1c84c85b6ffe5da7312840516386de49"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__client__setup.html#ga1c84c85b6ffe5da7312840516386de49">erpc_arbitrated_client_deinit</a> (void)</td></tr>
<tr class="memdesc:ga1c84c85b6ffe5da7312840516386de49"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function de-initializes client.  <a href="#ga1c84c85b6ffe5da7312840516386de49">More...</a><br /></td></tr>
<tr class="separator:ga1c84c85b6ffe5da7312840516386de49"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Client setup</h2></td></tr>
<tr class="memitem:gaf3f29e558eadfae73ff3f20ab11d0200"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__client__setup.html#gaf3f29e558eadfae73ff3f20ab11d0200">erpc_client_init</a> (<a class="el" href="group__transport__setup.html#ga925aa73c3fc0da2a6f94ee65c4b108c0">erpc_transport_t</a> transport, <a class="el" href="group__message__buffer__factory__setup.html#ga73f8fbab58ca7553109bc98b28e72bf5">erpc_mbf_t</a> message_buffer_factory)</td></tr>
<tr class="memdesc:gaf3f29e558eadfae73ff3f20ab11d0200"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes client.  <a href="#gaf3f29e558eadfae73ff3f20ab11d0200">More...</a><br /></td></tr>
<tr class="separator:gaf3f29e558eadfae73ff3f20ab11d0200"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0031e29227c42bbd3889e380b3a271cd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__client__setup.html#ga0031e29227c42bbd3889e380b3a271cd">erpc_client_deinit</a> (void)</td></tr>
<tr class="memdesc:ga0031e29227c42bbd3889e380b3a271cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function de-initializes client.  <a href="#ga0031e29227c42bbd3889e380b3a271cd">More...</a><br /></td></tr>
<tr class="separator:ga0031e29227c42bbd3889e380b3a271cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="gab7dcc8461d2301b2ae32448b0f69ef85"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* client_error_handler_t) (<a class="el" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> err)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>eRPC error handler function type. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gad9d2c46ec314b6a5b0a2010b82e6ff07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__transport__setup.html#ga925aa73c3fc0da2a6f94ee65c4b108c0">erpc_transport_t</a> erpc_arbitrated_client_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__transport__setup.html#ga925aa73c3fc0da2a6f94ee65c4b108c0">erpc_transport_t</a>&#160;</td>
          <td class="paramname"><em>transport</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__message__buffer__factory__setup.html#ga73f8fbab58ca7553109bc98b28e72bf5">erpc_mbf_t</a>&#160;</td>
          <td class="paramname"><em>message_buffer_factory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes a client that shares its transport with the server. </p>
<p>This function initializes a client with all components necessary for sending client requests using the same transport instance as used by a server. Only one instance of the shared transport should be created. The transport arbitrator that wraps the shared transport is returned. This arbitrator, not the shared transport, should be passed to the server setup routine.</p>
<p>Example use: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;erpc_transport_t sharedSerial = erpc_transport_serial_init(...);</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;erpc_transport_t arbitrator = erpc_arbitrated_client_init(sharedSerial);</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;erpc_server_init(arbitrator);</div></div><!-- fragment --><dl class="section return"><dt>Returns</dt><dd>Transport arbitrator reference that should be passed to the server setup API. </dd></dl>

</div>
</div>
<a class="anchor" id="gaed9d0f4e2c3a22bde5a4f1077c54f04e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void erpc_client_set_error_handler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__client__setup.html#gab7dcc8461d2301b2ae32448b0f69ef85">client_error_handler_t</a>&#160;</td>
          <td class="paramname"><em>error_handler</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function set error handler function. </p>
<p>Given error_handler function is called when error occur inside eRPC infrastructure.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">error_handler</td><td>Pointer to function error handler. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga1c84c85b6ffe5da7312840516386de49"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void erpc_arbitrated_client_deinit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function de-initializes client. </p>
<p>This function de-initializes client and all components which it own. </p>

</div>
</div>
<a class="anchor" id="gaf3f29e558eadfae73ff3f20ab11d0200"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void erpc_client_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__transport__setup.html#ga925aa73c3fc0da2a6f94ee65c4b108c0">erpc_transport_t</a>&#160;</td>
          <td class="paramname"><em>transport</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__message__buffer__factory__setup.html#ga73f8fbab58ca7553109bc98b28e72bf5">erpc_mbf_t</a>&#160;</td>
          <td class="paramname"><em>message_buffer_factory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function initializes client. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">transport</td><td>Initiated transport. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">message_buffer_factory</td><td>Initiated message buffer factory.</td></tr>
  </table>
  </dd>
</dl>
<p>This function initializes client with all components necessary for serve client request. </p>

</div>
</div>
<a class="anchor" id="ga0031e29227c42bbd3889e380b3a271cd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void erpc_client_deinit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function de-initializes client. </p>
<p>This function de-initializes client and all components which it own. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
